/* ===== Page Header ===== */
.page-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0ead1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row-reverse;
  width: 80%;
  margin-left: 2%;
}

.page-header h1 {
  color: #2c4b2c;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.page-header p {
  color: #596d52;
  font-size: 14px;
}

.btn-back {
  padding: 10px 20px;
  background: linear-gradient(135deg, #779e63 0%, #596d52 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-back:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px;
}

/* ===== Customers Grid ===== */
.customers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  width: 80%;
  margin-left: 2%;
  direction: rtl;
}

.customer-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
  transition: all 0.3s ease;
  animation: fadeIn 0.4s ease;
}

.customer-card:hover {
  transform: translateY(-5px);
  box-shadow: rgba(0, 0, 0, 0.15) 0px 8px 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.customer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0ead1;
}

.customer-name {
  color: #2c4b2c;
  font-size: 18px;
  font-weight: 600;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-indicator.online .status-dot {
  background: #4caf50;
}

.status-indicator.offline .status-dot {
  background: #9e9e9e;
  animation: none;
}

.status-indicator.online {
  color: #4caf50;
}

.status-indicator.offline {
  color: #9e9e9e;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.customer-info {
  margin-bottom: 15px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.info-label {
  color: #596d52;
}

.info-value {
  color: #2c4b2c;
  font-weight: 600;
}

.btn-view-details {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #2c4b2c 0%, #1e3a1e 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-view-details:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  flex-direction: row-reverse;
  margin-bottom: 50px;
}

.pagination-btn {
  padding: 10px 15px;
  background: white;
  color: #2c4b2c;
  border: 2px solid #e0ead1;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: #e0ead1;
  border-color: #779e63;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: linear-gradient(135deg, #2c4b2c 0%, #1e3a1e 100%);
  color: white;
  border-color: #2c4b2c;
}

/* ===== Customer Details Page ===== */
.info-section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
  width: 70%;
  margin-bottom: 25px;
  margin-left: 8%;
  direction: rtl;
}

.section-title {
  color: #2c4b2c;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e0ead1;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.info-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  color: #596d52;
  font-size: 13px;
  font-weight: 500;
}

.field-value {
  color: #2c4b2c;
  font-size: 15px;
  font-weight: 600;
  padding: 10px;
  background: #f9efe3;
  border-radius: 6px;
}

.btn-change-password {
  padding: 12px 25px;
  background: linear-gradient(135deg, #779e63 0%, #596d52 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-change-password:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px;
}

/* ===== Products List ===== */
.products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.product-card {
  background: #fdf9f4;
  border-radius: 8px;
  padding: 15px;
  text-align: right;
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.product-name {
  color: #2c4b2c;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}

.product-price {
  color: #779e63;
  font-size: 13px;
  font-weight: 600;
}

.empty-message {
  text-align: center;
  color: #596d52;
  padding: 30px;
  font-size: 14px;
}

/* ===== Orders List ===== */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.order-item {
  background: #fdf9f4;
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid #779e63;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0ead1;
}

.order-id {
  color: #2c4b2c;
  font-weight: 600;
  font-size: 16px;
}

.order-status {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.order-status.delivered {
  background: #4caf50;
  color: white;
}

.order-status.shipping {
  background: #2196f3;
  color: white;
}

.order-status.pending {
  background: #ff9800;
  color: white;
}

.order-status.cancelled {
  background: #f44336;
  color: white;
}

.order-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.order-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  color: #596d52;
  font-size: 12px;
}

.detail-value {
  color: #2c4b2c;
  font-size: 14px;
  font-weight: 600;
}

/* ===== Reviews List ===== */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-item {
  background: #fdf9f4;
  border-radius: 8px;
  padding: 20px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.product-name-review {
  color: #2c4b2c;
  font-size: 16px;
  font-weight: 600;
}

.rating-stars {
  color: #ffc107;
  font-size: 18px;
}

.review-text {
  color: #596d52;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.review-images {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.review-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.review-image:hover {
  transform: scale(1.05);
}

/* ===== Password Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 20px 60px;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  background: linear-gradient(135deg, #e0ead1 0%, #f9efe3 100%);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
}

.modal-header h3 {
  color: #2c4b2c;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #2c4b2c;
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.btn-close-modal:hover {
  background: rgba(44, 75, 44, 0.1);
  transform: rotate(90deg);
}

.modal-body {
  padding: 25px;
}

.password-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0ead1;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.password-input:focus {
  outline: none;
  border-color: #779e63;
  box-shadow: 0 0 0 3px rgba(119, 158, 99, 0.1);
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #779e63 0%, #596d52 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px;
}

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-loader {
  display: inline-block;
}

.rotating {
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== Toast Notification ===== */
.toast-notification {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2c4b2c 0%, #1e3a1e 100%);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 8px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  z-index: 2000;
  transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-notification.show {
  bottom: 30px;
}

.toast-icon {
  font-size: 20px;
  color: #a8d08d;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .customers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-header {
    width: 90%;
    margin-left: 5%;
  }

  .customers-grid,
  .info-section {
    width: 90%;
    margin-left: 5%;
  }
}

@media (max-width: 768px) {
  .customers-grid {
    grid-template-columns: 1fr;
    width: 90%;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .products-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .page-header {
    width: 90%;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .btn-back {
    width: 100%;
    justify-content: center;
  }

  .info-section {
    width: 95%;
    margin-left: 2.5%;
    padding: 15px;
  }

  .modal-container {
    width: 95%;
  }
}
